package com.spic.business.accident.analysisReport.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.spic.business.common.core.workflow.WorkFlowEntity;
import com.spic.common.core.annotation.Excel;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 事故分析报告对象 accident_analysis_report
 *
 * @author spic
 * @date 2021-11-30
 */
@Data
public class AccidentAnalysisReport extends WorkFlowEntity {
    private static final long serialVersionUID = 1L;


    /**
     * 事故分析报告编号
     */
    @Excel(name = "事故分析报告编号")
    private Long reportNum;

    /**
     * 事故分析报告年份
     */
    private String reportYear;

    /**
     * 报告时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @Excel(name = "报告时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date reportDate;

    /**
     * 事故报告单位
     */
    @Excel(name = "事故报告单位")
    private Long reportDepartment;

    @TableField(exist = false)
    private String reportDepartmentName;

    /**
     * 事故发生单位
     */
    @Excel(name = "事故发生单位")
    private String accidentDepartment;

    @TableField(exist = false)
    private String accidentDepartmentName;

    /**
     * 事故报告单位及其下属部门
     */
    @TableField(exist = false)
    private List<Long> reportDepartments;
    /**
     * 事故发生单位及其下属部门
     */
    @TableField(exist = false)
    private List<Long> accidentDepartments;
    /**
     * 事件名称
     */
    @Excel(name = "事件名称")
    private String accidentName;

    /**
     * 事件发生时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @Excel(name = "事件发生时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date accidentDate;

    /**
     * 事件发生前状态
     */
    @Excel(name = "事件发生前状态")
    private String accdientBeforeState;

    /**
     * 事件过程
     */
    @Excel(name = "事件过程")
    private String accdientProcess;

    /**
     * 人身伤害和设备损失情况
     */
    @Excel(name = "人身伤害和设备损失情况")
    private String lossSituation;

    /**
     * 事故直接原因
     */
    @Excel(name = "事故直接原因")
    private String immediateReson;

    /**
     * 间接原因
     */
    @Excel(name = "间接原因")
    private String remoteReson;

    /**
     * 事件不符合项
     */
    @Excel(name = "事件不符合项")
    private String inconformityItem;

    /**
     * 事故其他问题
     */
    @Excel(name = "事故其他问题")
    private String otherProblems;

    /**
     * 纠正措施
     */
    @Excel(name = "纠正措施")
    private String correctiveAction;

    /**
     * 责任分析与责任人处理情况
     */
    @Excel(name = "责任分析与责任人处理情况")
    private String responsibilityAnalysisAndHandlingSituation;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date createTime;

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    private String createBy;

    /**
     * 报告数量
     */
    @TableField(exist = false)
    private Long count;

    /**
     * 是否隐藏
     */
    private String coverFlag;
    /**
     * 實例ID
     */
    private String instanceId;

    /**
     * 事故类型
     */
    private String accdientType;

    /**
     * 事故等级
     */
    private String accdientLevel;

    private String accidentInstantId; //事故即时报告 id

    //事故定损   金额
    private BigDecimal accidentDetermination;

    @TableField(exist = false)
    private List<AccidentAnalysisReportTreatmentSubtable> accidentAnalysisReportTreatmentSubtableList;

}
